package it.traveldream.dto;

import it.traveldream.utils.CalendarUtils.WeekDay;

import java.math.BigDecimal;

public class ExcursionDTO extends ProductDTO {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private int duration;
	private BigDecimal price;
	private WeekDay weekDay;
	
	public int getDuration() {
		return this.duration;
	}
	public void setDuration(int duration) {
		this.duration = duration;
	}
	public BigDecimal getPrice() {
		return this.price;
	}
	public void setPrice(BigDecimal price) {
		this.price = price;
	}
	public WeekDay getWeekDay() {
		return this.weekDay;
	}
	public void setWeekDay(WeekDay weekDay) {
		this.weekDay = weekDay;
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((this.getProductId() == null) ? 0 : this.getProductId().hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (!(obj instanceof ExcursionDTO))
			return false;
		ExcursionDTO other = (ExcursionDTO) obj;
		if (other.getProductId().equals(this.getProductId()))
			return true;
		return false;
	}
}
